Optimal. Leaf size=89 \[ -\frac{\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{\sqrt{a} (a+b)^{7/2}}-\frac{\cot ^5(x)}{5 (a+b)}-\frac{(2 a+3 b) \cot ^3(x)}{3 (a+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.101601, antiderivative size = 89, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3191, 390, 205} \[ -\frac{\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{\sqrt{a} (a+b)^{7/2}}-\frac{\cot ^5(x)}{5 (a+b)}-\frac{(2 a+3 b) \cot ^3(x)}{3 (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3191
Rule 390
Rule 205
Rubi steps
\begin{align*} \int \frac{\csc ^6(x)}{a+b \cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^3}{a+(a+b) x^2} \, dx,x,\cot (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{a^2+3 a b+3 b^2}{(a+b)^3}+\frac{(2 a+3 b) x^2}{(a+b)^2}+\frac{x^4}{a+b}+\frac{b^3}{(a+b)^3 \left (a+(a+b) x^2\right )}\right ) \, dx,x,\cot (x)\right )\\ &=-\frac{\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac{(2 a+3 b) \cot ^3(x)}{3 (a+b)^2}-\frac{\cot ^5(x)}{5 (a+b)}-\frac{b^3 \operatorname{Subst}\left (\int \frac{1}{a+(a+b) x^2} \, dx,x,\cot (x)\right )}{(a+b)^3}\\ &=-\frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{\sqrt{a} (a+b)^{7/2}}-\frac{\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac{(2 a+3 b) \cot ^3(x)}{3 (a+b)^2}-\frac{\cot ^5(x)}{5 (a+b)}\\ \end{align*}
Mathematica [A] time = 0.38139, size = 90, normalized size = 1.01 \[ \frac{b^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a+b}}\right )}{\sqrt{a} (a+b)^{7/2}}-\frac{\cot (x) \left (\left (4 a^2+13 a b+9 b^2\right ) \csc ^2(x)+8 a^2+3 (a+b)^2 \csc ^4(x)+26 a b+33 b^2\right )}{15 (a+b)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 106, normalized size = 1.2 \begin{align*}{\frac{{b}^{3}}{ \left ( a+b \right ) ^{3}}\arctan \left ({a\tan \left ( x \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}}-{\frac{1}{ \left ( 5\,a+5\,b \right ) \left ( \tan \left ( x \right ) \right ) ^{5}}}-{\frac{2\,a}{3\, \left ( a+b \right ) ^{2} \left ( \tan \left ( x \right ) \right ) ^{3}}}-{\frac{b}{ \left ( a+b \right ) ^{2} \left ( \tan \left ( x \right ) \right ) ^{3}}}-{\frac{{a}^{2}}{ \left ( a+b \right ) ^{3}\tan \left ( x \right ) }}-3\,{\frac{ab}{ \left ( a+b \right ) ^{3}\tan \left ( x \right ) }}-3\,{\frac{{b}^{2}}{ \left ( a+b \right ) ^{3}\tan \left ( x \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.04315, size = 1446, normalized size = 16.25 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21034, size = 211, normalized size = 2.37 \begin{align*} \frac{{\left (\pi \left \lfloor \frac{x}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{a \tan \left (x\right )}{\sqrt{a^{2} + a b}}\right )\right )} b^{3}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt{a^{2} + a b}} - \frac{15 \, a^{2} \tan \left (x\right )^{4} + 45 \, a b \tan \left (x\right )^{4} + 45 \, b^{2} \tan \left (x\right )^{4} + 10 \, a^{2} \tan \left (x\right )^{2} + 25 \, a b \tan \left (x\right )^{2} + 15 \, b^{2} \tan \left (x\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{15 \,{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (x\right )^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]